<template>
  <div id="app">
    <h2>测试题</h2>
    <subject
      v-for="(item, index) in arr"
      :key="index"
      :list="item"
    ></subject>
    <div>
      <flag v-for="(item, index) in arr" :key="index" :list="item"></flag>
    </div>
  </div>
</template>

<script>
import flag from "./components/Flag";
import subject from "./components/Subject.vue";
export default {
  components: {
    flag,
    subject,
  },
  data() {
    return {
      arr: [
        { id:1, num1: 0, num2: 0, sum: 0, status:''},
        { id:2, num1: 0, num2: 0, sum: 0, status:''},
        { id:3, num1: 0, num2: 0, sum: 0, status:''},
        { id:4, num1: 0, num2: 0, sum: 0, status:''},
        { id:5, num1: 0, num2: 0, sum: 0, status:''},
        { id:6, num1: 0, num2: 0, sum: 0, status:''},
      ],
    };
  },
};
</script>

<style>
body {
  background-color: #eee;
}

#app {
  background-color: #fff;
  width: 500px;
  margin: 50px auto;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
  padding: 2em;
}
</style>